<template>
  <div class="collect-page">
    <!-- 我的收藏 -->
    <van-nav-bar
      title="收藏列表"
      left-arrow
      @click-left="$router.push('/mymine')"
    />
      <Collection v-for="(item, index) in list" :key="index"
      :item ="item"
      ></Collection>
  </div>
</template>

<script>
import { getCollect } from '@/api/other'
import Collection from '@/components/collection.vue'
export default {
  name: 'collect-page',
  components: {
    Collection
  },
  data () {
    return {
      list: []
    }
  },
  // methods: {
  //   async onload () {
  //     const { body } = await getCollect()
  //     console.log(body)
  //     // this.list.push(...body)
  //     this.list = body
  //   }
  // }
  async created () {
    const { body } = await getCollect()
    console.log(body)
    this.list = body
  },
  methods: {
  }
}
</script>

<style lang="less" scoped>

</style>
